using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Player_IdleState : PlayerStateInGround
{
    public Player_IdleState(Player player, StateMachine stateMachine, string animName) : base(player, stateMachine, animName)
    {

    }
    public override void Enter()
    {
        base.Enter();
        player.SetVelocity(0, rb.velocity.y);
    }
    public override void Update()
    {
        base.Update();
        
        if (player.IsWall && player.moveInput.x == player.facingDir)
            return;
        if (player.moveInput.x != 0)
        {
            stateMachine.ChangeState(player.moveState);
        }
    }
    public override void Exit()
    {
        base.Exit();
    }
}
